GetAddress

Category: IRC

Syntax:
$GetAddress(nick)

Returns the user@host that nick is using to connect to IRC. If the server is not connected or the address can't be found, the function returns "unknown@unknown". If GetAddress is invoked from the global interpreter (e.g., from a main menu item), it returns "no@server".

This function works by sending a USERHOST request to the server and waiting for a response. GetAddress will not return until the server responds or a timeout is reached, but events and aliases may still run while the function is waiting (see Yield).

Example:
// ban someone by hostname
Alias HBAN
@l $address = $GetAddress($1)
if [$address] == [unknown@unknown]
  TextOut > $C ecError *** Can't find the address of $1
else
  @l $host = $StrTokR(@ $address)
  Mode $C +b *!*@$host
endif

See also: UhostToMask


Next in "IRC": GetKey
Previous in "IRC": FlushIAL
Next by name: GetClipboard
Previous by name: FreeMem
Up to all functions by name or commands and functions by category